This invention relates to a device for compressing/decompressing bit strings comprising control means having a first processing speed and suitable for associating bit strings of a source information with corresponding compression codes.
In particular, the present invention relates to an electronic device for equipment for transmitting and receiving facsimiles (fax machines).
It is known that equipment such as, for example, fax machines are suitable for compressing the information to be transmitted (source information) and for decompressing the compressed information received.
It is also known that in fax machines the information to be transmitted is compressed and the information received is decompressed in accordance with suitable standards, for instance the T.4 standard of the International Telecommunications Union (ITU-T).
For example, it is known that during transmission the fax machine reads the source information in the form of rows of bits having, for example, horizontal and vertical resolution of 200 dots by 25.4 mm and compresses the information, consisting of sequences of white dots (white run length) or black dots (black run length), in accordance with the above-mentioned standard T.4, associating with sequence of bits of the same sign a code word of length between 2 and 13 bits.
It is also known that the compression operations, which consist in associating with each sequence of bits of the same sign the corresponding code word and in appending the code words in such a way as to form blocks of information comprising an integral number of bytes, are executed by the fax machine by means of its central unit (CPU) and appropriate programs stored in the memory of the fax machine itself.
In particular it is known that the appending of the code words, is extremely demanding of the fax machine""s CPU and consequently requires high processing times.
In fact, the appending operation requires the CPU to operate in its own internal registers manipulating, not an integral number of bytes, but the bits and one by one at that, since the xe2x80x9ccode wordsxe2x80x9d are strings of bits of variable length. For example, in order to append a xe2x80x9ccode wordxe2x80x9d 13 bits long and another one 3 bits long the CPU of a fax machine will have to execute the following operations: load the first code word in a first register, load the second code word in a second register and copy the second code word bit by bit from the second register to the first.
It is therefore obvious to those acquainted with the sector art that, assuming that the CPU takes at least 3 clock beats for each elementary instruction, the simple appending of a code word of 3 bits to another one of 13 bits requires at least 5 elementary instructions of the CPU and therefore at least 15 clock beats.
From the above example, it emerges that in a fax machine the compression times and, in particular, those for appending the code words in such a way as to form blocks of bytes, are generally high and are very closely dependant on the clock and the power of the CPU used.
Naturally the same remarks about the limits of the known art can also be applied to the decompression operations which consist in identifying, xe2x80x9cextractingxe2x80x9d or xe2x80x9cunpackingxe2x80x9d the single code words from blocks of information received and in reconstructing the source information on the basis of the code words identified.
In short, it is obvious that the compression and decompression times, in a fax machine for example, are for the known art a bottle-neck which is difficult to negotiate and avoided by using particularly fast or special CPU""s.
It is also known, from the U.S. Pat. No. 5,436,626, a variable length encoder, used in high speed data transmission, which associates bit strings of a source information with corresponding compression codes at a first processing speed, and which appends the compression codes in order to form blocks of compressed information at a second processing speed greater than the first processing speed. However the disclosure of the U.S. Pat. No. 5,436,626 is performed in broad terms and concerns essentially only the main and general features of this variable length encoder. In particular the latter is proposed merely for a wide and generic use in the high-speed data transmission field. Therefore such document is very far from entering into the details which allow this variable length encoder to be implemented and to be improved as efficiency in more specific and limited fields, as for example the data transmission in a facsimile machine.
The object of this invention is to untie, in particular in a fax machine, the operations of compression of the source information and/or decompression of the compressed information received from the characteristics of the CPU used and, at the same time, to improve the times of these operations by at least a factor of 10.
This technical problem is solved by the device for compressing/decompressing bit strings characterised by storing means, having a second processing speed greater than the first processing speed, connected to the control means and suitable for appending the compression codes one to another in order to form blocks of compressed information, whereby the blocks of compressed information are suitable for being manipulated as blocks by the control means.
According to another characteristic, the device implements a new method for compressing/decompressing bit strings characterised in that the functions of appending compression codes (compression) and extracting compression codes (decompression) are performed bit by bit at a processing speed much greater than that of the CPU used by the fax.